package no.capgemini.jzinema.activity.moviedetails;


import no.capgemini.jzinema.R;
import no.capgemini.jzinema.backgroundthreads.ImageDownloader;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;

/**
 * Simple class that makes it possible to show an image in fullscreen by
 * downloading the image from the URL passed in the intent.
 * 
 * @author Hans Petter Eide
 */
public class MovieDetailsFullscreenImageActivity extends Activity {

    @Override
	protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.movie_details_fullscreen_image);
        
        ImageDownloader downloader = ImageDownloader.getInstance(this);
        Intent intent = getIntent();

        ImageView imgView = (ImageView)findViewById(R.id.movie_details_fullscreen_image);
        
        downloader.download(intent.getExtras().getString("URL"), imgView);
    }
}